package com.hutra.utils {
	
	public class XMLProperties {
		private var _array:Array = new Array();
		private var _xmlblock:XML = new XML();
		public var _lang:int = 0;
		
		public function XMLProperties() {
		}
		
		public function setXML(xmls:XML = null):void {
			this._xmlblock = xmls;
		}
		
		public function getXML():XML {
			return this._xmlblock;
		}
		
		public function getArray():Array {
			return _array;
		}
		
		public function setArray(arr:Array = null):void {
			this._array = arr;
		}
		
		public function getLang():int {
			return this._lang;
		}
		
		public function setLang(i:int = 0):void {
			this._lang = i;
		}
		
		public function getArrayXML():Array {
			var keyProper:Array = new Array();
			for (var i:int = 0; i < _xmlblock.child("*").length(); i++) {
				var valueProper:Array = new Array();
				valueProper.push(_xmlblock.children()[i].children()[1]);
				valueProper.push(_xmlblock.children()[i].children()[2]);
				keyProper[_xmlblock.children()[i].children()[0]] = valueProper;
			}
			setLang(new int(keyProper["language.default"][0]));
			setArray(keyProper);
			return keyProper;
		}
	}
}